package webdemo.test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import www.albertzhe.manager.http.HttpResult;
import www.albertzhe.manager.http.iamp.IampRequest;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:spring/applicationContext.xml" })
public class SpringTask {

    @Autowired
    private IampRequest iampRequest;

    @Test
    public void test1() {
        HttpResult result = iampRequest.logon("le", "111");
        if (result.isFlag()) {
            System.out.println(result.getContent());
        } else {
            System.err.println(result.getContent());
        }
    }
}
